# Maintainer: Alexander F. Rødseth <xyproto@archlinux.org>
# Contributor: Angel Velasquez <angvp@archlinux.org>
# Contributor: Ionut Biru  <ibiru@archlinux.ro>
# Contributor: William Rea <sillywilly@gmail.com>
# Contributor: Allan McRae <mcrae_allan@hotmail.com>

pkgname=geany
pkgver=2.0
pkgrel=1
pkgdesc='Fast and lightweight IDE'
arch=(loong64 x86_64)
url='https://www.geany.org/'
license=(GPL)
depends=(gtk3)
makedepends=(doxygen intltool python-lxml)
optdepends=('geany-plugins: additional functionality'
            'vte3: embedded terminal support')
source=("https://download.geany.org/$pkgname-$pkgver.tar.bz2")
b2sums=('9a810827c3c8e5156329ec2e693d7181183d341ea74b5cbca940904912004e09b1ac0307710d2a6bec76c3c4b3e08c0a5231ffe5e65ba1234b33900192703d1a')

build() {
  cd $pkgname-$pkgver
  ./configure --enable-gtk3 --enable-gtkdoc-header --prefix=/usr
  sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool
  make
}

package() {
  make -C $pkgname-$pkgver DESTDIR="$pkgdir" install
}
